/*
Adept MobileRobots Robotics Interface for Applications (ARIA)
Copyright (C) 2004-2005 ActivMedia Robotics LLC
Copyright (C) 2006-2010 MobileRobots Inc.
Copyright (C) 2011-2015 Adept Technology, Inc.
Copyright (C) 2016-2018 Omron Adept Technologies, Inc.

     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2 of the License, or
     (at your option) any later version.

     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.

     You should have received a copy of the GNU General Public License
     along with this program; if not, write to the Free Software
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

If you wish to redistribute ARIA under different terms, contact 
Adept MobileRobots for information about a commercial version of ARIA at 
robots@mobilerobots.com or 
Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960
*/
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.8
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.mobilerobots.ArNetworking;
import com.mobilerobots.Aria.*;
public class ArServerHandlerConfig {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

  public ArServerHandlerConfig(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(ArServerHandlerConfig obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        ArNetworkingJavaJNI.delete_ArServerHandlerConfig(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public ArServerHandlerConfig(ArServerBase server, ArConfig config, String defaultFile, String defaultFileBaseDirectory, boolean allowFactory, String robotName, boolean preventChanges, String preventChangesString) {
    this(ArNetworkingJavaJNI.new_ArServerHandlerConfig__SWIG_0(ArServerBase.getCPtr(server), server, ArConfig.getCPtr(config), config, defaultFile, defaultFileBaseDirectory, allowFactory, robotName, preventChanges, preventChangesString), true);
  }

  public ArServerHandlerConfig(ArServerBase server, ArConfig config, String defaultFile, String defaultFileBaseDirectory, boolean allowFactory, String robotName, boolean preventChanges) {
    this(ArNetworkingJavaJNI.new_ArServerHandlerConfig__SWIG_1(ArServerBase.getCPtr(server), server, ArConfig.getCPtr(config), config, defaultFile, defaultFileBaseDirectory, allowFactory, robotName, preventChanges), true);
  }

  public ArServerHandlerConfig(ArServerBase server, ArConfig config, String defaultFile, String defaultFileBaseDirectory, boolean allowFactory, String robotName) {
    this(ArNetworkingJavaJNI.new_ArServerHandlerConfig__SWIG_2(ArServerBase.getCPtr(server), server, ArConfig.getCPtr(config), config, defaultFile, defaultFileBaseDirectory, allowFactory, robotName), true);
  }

  public ArServerHandlerConfig(ArServerBase server, ArConfig config, String defaultFile, String defaultFileBaseDirectory, boolean allowFactory) {
    this(ArNetworkingJavaJNI.new_ArServerHandlerConfig__SWIG_3(ArServerBase.getCPtr(server), server, ArConfig.getCPtr(config), config, defaultFile, defaultFileBaseDirectory, allowFactory), true);
  }

  public ArServerHandlerConfig(ArServerBase server, ArConfig config, String defaultFile, String defaultFileBaseDirectory) {
    this(ArNetworkingJavaJNI.new_ArServerHandlerConfig__SWIG_4(ArServerBase.getCPtr(server), server, ArConfig.getCPtr(config), config, defaultFile, defaultFileBaseDirectory), true);
  }

  public ArServerHandlerConfig(ArServerBase server, ArConfig config, String defaultFile) {
    this(ArNetworkingJavaJNI.new_ArServerHandlerConfig__SWIG_5(ArServerBase.getCPtr(server), server, ArConfig.getCPtr(config), config, defaultFile), true);
  }

  public ArServerHandlerConfig(ArServerBase server, ArConfig config) {
    this(ArNetworkingJavaJNI.new_ArServerHandlerConfig__SWIG_6(ArServerBase.getCPtr(server), server, ArConfig.getCPtr(config), config), true);
  }

  public void reloadConfig(ArServerClient client, ArNetPacket packet) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_reloadConfig(swigCPtr, this, ArServerClient.getCPtr(client), client, ArNetPacket.getCPtr(packet), packet);
  }

  public void getConfigBySections(ArServerClient client, ArNetPacket packet) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_getConfigBySections(swigCPtr, this, ArServerClient.getCPtr(client), client, ArNetPacket.getCPtr(packet), packet);
  }

  public void getConfigBySectionsV2(ArServerClient client, ArNetPacket packet) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_getConfigBySectionsV2(swigCPtr, this, ArServerClient.getCPtr(client), client, ArNetPacket.getCPtr(packet), packet);
  }

  public void getConfigBySectionsV3(ArServerClient client, ArNetPacket packet) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_getConfigBySectionsV3(swigCPtr, this, ArServerClient.getCPtr(client), client, ArNetPacket.getCPtr(packet), packet);
  }

  public void getConfigBySectionsV4(ArServerClient client, ArNetPacket packet) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_getConfigBySectionsV4(swigCPtr, this, ArServerClient.getCPtr(client), client, ArNetPacket.getCPtr(packet), packet);
  }

  public void getConfig(ArServerClient client, ArNetPacket packet) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_getConfig(swigCPtr, this, ArServerClient.getCPtr(client), client, ArNetPacket.getCPtr(packet), packet);
  }

  public void setConfig(ArServerClient client, ArNetPacket packet) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_setConfig(swigCPtr, this, ArServerClient.getCPtr(client), client, ArNetPacket.getCPtr(packet), packet);
  }

  public void setConfigParam(ArServerClient client, ArNetPacket packet) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_setConfigParam(swigCPtr, this, ArServerClient.getCPtr(client), client, ArNetPacket.getCPtr(packet), packet);
  }

  public void setConfigBySections(ArServerClient client, ArNetPacket packet) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_setConfigBySections(swigCPtr, this, ArServerClient.getCPtr(client), client, ArNetPacket.getCPtr(packet), packet);
  }

  public void setConfigBySectionsV2(ArServerClient client, ArNetPacket packet) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_setConfigBySectionsV2(swigCPtr, this, ArServerClient.getCPtr(client), client, ArNetPacket.getCPtr(packet), packet);
  }

  public void getConfigDefaults(ArServerClient client, ArNetPacket packet) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_getConfigDefaults(swigCPtr, this, ArServerClient.getCPtr(client), client, ArNetPacket.getCPtr(packet), packet);
  }

  public void getConfigSectionFlags(ArServerClient client, ArNetPacket packet) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_getConfigSectionFlags(swigCPtr, this, ArServerClient.getCPtr(client), client, ArNetPacket.getCPtr(packet), packet);
  }

  public void getLastEditablePriority(ArServerClient client, ArNetPacket packet) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_getLastEditablePriority(swigCPtr, this, ArServerClient.getCPtr(client), client, ArNetPacket.getCPtr(packet), packet);
  }

  public void addPreWriteCallback(ArFunctor functor, ArListPos.Pos position) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_addPreWriteCallback__SWIG_0(swigCPtr, this, ArFunctor.getCPtr(functor), functor, position.swigValue());
  }

  public void addPreWriteCallback(ArFunctor functor) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_addPreWriteCallback__SWIG_1(swigCPtr, this, ArFunctor.getCPtr(functor), functor);
  }

  public void remPreWriteCallback(ArFunctor functor) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_remPreWriteCallback(swigCPtr, this, ArFunctor.getCPtr(functor), functor);
  }

  public void addPostWriteCallback(ArFunctor functor, ArListPos.Pos position) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_addPostWriteCallback__SWIG_0(swigCPtr, this, ArFunctor.getCPtr(functor), functor, position.swigValue());
  }

  public void addPostWriteCallback(ArFunctor functor) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_addPostWriteCallback__SWIG_1(swigCPtr, this, ArFunctor.getCPtr(functor), functor);
  }

  public void remPostWriteCallback(ArFunctor functor) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_remPostWriteCallback(swigCPtr, this, ArFunctor.getCPtr(functor), functor);
  }

  public void addConfigUpdatedCallback(ArFunctor functor, ArListPos.Pos position) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_addConfigUpdatedCallback__SWIG_0(swigCPtr, this, ArFunctor.getCPtr(functor), functor, position.swigValue());
  }

  public void addConfigUpdatedCallback(ArFunctor functor) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_addConfigUpdatedCallback__SWIG_1(swigCPtr, this, ArFunctor.getCPtr(functor), functor);
  }

  public void remConfigUpdatedCallback(ArFunctor functor) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_remConfigUpdatedCallback(swigCPtr, this, ArFunctor.getCPtr(functor), functor);
  }

  public void restartIO(String reason) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_restartIO(swigCPtr, this, reason);
  }

  public void restartSoftware(String reason) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_restartSoftware(swigCPtr, this, reason);
  }

  public void restartHardware(String reason) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_restartHardware(swigCPtr, this, reason);
  }

  public void addRestartIOCB(ArFunctor functor, int position) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_addRestartIOCB__SWIG_0(swigCPtr, this, ArFunctor.getCPtr(functor), functor, position);
  }

  public void addRestartIOCB(ArFunctor functor) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_addRestartIOCB__SWIG_1(swigCPtr, this, ArFunctor.getCPtr(functor), functor);
  }

  public void remRestartIOCB(ArFunctor functor) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_remRestartIOCB(swigCPtr, this, ArFunctor.getCPtr(functor), functor);
  }

  public void setRestartSoftwareCB(ArFunctor restartServerCB) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_setRestartSoftwareCB(swigCPtr, this, ArFunctor.getCPtr(restartServerCB), restartServerCB);
  }

  public ArFunctor getRestartSoftwareCB() {
    long cPtr = ArNetworkingJavaJNI.ArServerHandlerConfig_getRestartSoftwareCB(swigCPtr, this);
    return (cPtr == 0) ? null : new ArFunctor(cPtr, false);
  }

  public void setRestartHardwareCB(ArFunctor restartRobotCB) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_setRestartHardwareCB(swigCPtr, this, ArFunctor.getCPtr(restartRobotCB), restartRobotCB);
  }

  public ArFunctor getRestartHardwareCB() {
    long cPtr = ArNetworkingJavaJNI.ArServerHandlerConfig_getRestartHardwareCB(swigCPtr, this);
    return (cPtr == 0) ? null : new ArFunctor(cPtr, false);
  }

  public int lockConfig() {
    return ArNetworkingJavaJNI.ArServerHandlerConfig_lockConfig(swigCPtr, this);
  }

  public int tryLockConfig() {
    return ArNetworkingJavaJNI.ArServerHandlerConfig_tryLockConfig(swigCPtr, this);
  }

  public int unlockConfig() {
    return ArNetworkingJavaJNI.ArServerHandlerConfig_unlockConfig(swigCPtr, this);
  }

  public boolean writeConfig() {
    return ArNetworkingJavaJNI.ArServerHandlerConfig_writeConfig(swigCPtr, this);
  }

  public boolean configUpdated(ArServerClient client) {
    return ArNetworkingJavaJNI.ArServerHandlerConfig_configUpdated__SWIG_0(swigCPtr, this, ArServerClient.getCPtr(client), client);
  }

  public boolean configUpdated() {
    return ArNetworkingJavaJNI.ArServerHandlerConfig_configUpdated__SWIG_1(swigCPtr, this);
  }

  public void setPreventChanges(boolean preventChanges, String preventChangesString) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_setPreventChanges__SWIG_0(swigCPtr, this, preventChanges, preventChangesString);
  }

  public void setPreventChanges(boolean preventChanges) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_setPreventChanges__SWIG_1(swigCPtr, this, preventChanges);
  }

  public void setPreventChanges() {
    ArNetworkingJavaJNI.ArServerHandlerConfig_setPreventChanges__SWIG_2(swigCPtr, this);
  }

  public boolean loadDefaultsFromFile() {
    return ArNetworkingJavaJNI.ArServerHandlerConfig_loadDefaultsFromFile(swigCPtr, this);
  }

  public boolean loadDefaultsFromPacket(ArNetPacket packet) {
    return ArNetworkingJavaJNI.ArServerHandlerConfig_loadDefaultsFromPacket(swigCPtr, this, ArNetPacket.getCPtr(packet), packet);
  }

  public void createEmptyConfigDefaults() {
    ArNetworkingJavaJNI.ArServerHandlerConfig_createEmptyConfigDefaults(swigCPtr, this);
  }

  public void setAllowFactory(boolean allowFactory) {
    ArNetworkingJavaJNI.ArServerHandlerConfig_setAllowFactory(swigCPtr, this, allowFactory);
  }

  public boolean getAllowFactory() {
    return ArNetworkingJavaJNI.ArServerHandlerConfig_getAllowFactory(swigCPtr, this);
  }

}
